import {
    DIC
} from '@/const/dic';
import {
    timeFormatter
} from '../formatter';
import Store from '../../store/';
const allPermission = Store.state.user.permission;
const isAdmin = Store.state.user.userInfo.superAdmin;
export const expressFreeConditionTableOption = {
    border: true,
    index: true,
    selection: true,
    calcHeight: 350,
    columnBtn: false,
    searchClearable: false,
    selectClearBtn: false,
    searchResetBtn: false,
    height: "auto",
    menu: true,
    menuAlign: "center",
    searchBtn: true,
    labelWidth: 120,
    refreshBtn: true,
    tip: false,
    addBtn: false,
    dialogWidth: '600px',
    dialogHeight: 'auto',
    menuWidth: 180,
    editBtn: isAdmin || !!allPermission['/express-free-condition/edit'],
    viewBtn: false,
    delBtn: false,
    // isAdmin || !!allPermission['/express-free-condition/remove'],
    column: [{
            "label": "标题",
            "prop": "title",
            "search": true,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": true,
            "minWidth": "120",
            "readonly": false,
            "span": 24,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入标题",
                "trigger": "blur"
            }]
        },
        {
            "label": "包邮条件(元)",
            "prop": "value",
            "search": false,
            "type": "number",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入包邮条件",
                "trigger": "blur"
            }]
        },
        {
            "label": "创建时间",
            "prop": "create_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "修改时间",
            "prop": "modify_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        }
    ]
};
